package com.devplatform.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 广告点击记录表
 *
 * @TableName ad_clicks
 */
@TableName(value = "ad_clicks")
@Data
public class AdClicks {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 广告ID
     */
    private Integer adId;

    /**
     * 用户ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Integer userId;

    /**
     * 对应的曝光记录ID
     */
    private Long impressionId;

    /**
     * 用户IP
     */
    private String ipAddress;

    /**
     * 点击时间
     */
    private LocalDateTime clickTime;

    /**
     * 来源页面
     */
    private String referrer;
}